@layout("../../system/layout.html", {title: "文件上传"}){
<script src="${ctxPath}/static/js/diyUpload/js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="${ctxPath}/static/js/diyUpload/css/webuploader.css">
<link rel="stylesheet" type="text/css" href="${ctxPath}/static/js/diyUpload/css/diyUpload.css">
<script type="text/javascript" src="${ctxPath}/static/js/diyUpload/js/webuploader.html5only.min.js"></script>
<script type="text/javascript" src="${ctxPath}/static/js/diyUpload/js/diyUpload.js"></script>
<script src="${ctxPath}/static/plugins/layer/layer.js"></script>
<style>
    *{ margin:0; padding:0;}
    #demo{ margin:10px auto; width:1200px; min-height:400px; background:#CF9}
</style>

    <div id="demo">
        <div id="as" ></div>
    </div>

<script type="text/javascript">
    var vm = new Vue({
        el: '#dpLTE',
        data: {
            htmlResult: '',
            textResult: ''
        },
        methods: {
            setContent: function () {
                editorUtils.set(editor, '<p>用js设置的内容</p>');
            }
        }
    });

    $('#as').diyUpload({
        url:'${ctxPath}/sys/file/upload',
        success:function( data ) {
            layer.msg("文件上传成功！");
        },
        error:function( err ) {
            console.info( err );
        },
        buttonText : '选择文件',
        chunked:true,
        // 分片大小
        chunkSize:512 * 1024,
        //最大上传的文件数量, 总文件大小,单个文件大小(单位字节);
        fileNumLimit:50,
        fileSizeLimit:500000 * 1024,
        fileSingleSizeLimit:50000 * 1024,
        accept: {}
    });

</script>
@}